export enum MessageActionEnums {
  UPDATE = 'update',
  SAVE = 'save',
  EXIT = 'exit',
  TIPS = 'tips',
  INIT = 'init'
}

export enum RespMessageEnums {
  SUCCESS = 'success',
  ERROR = 'error'
}

/**
 * 消息来源PARENT 父窗口发出的消息 child子窗口发出来的消息
 */
export enum MessageFrom {
  PARENT = 'parent', CHILD = 'child'
}

/**
 * 接收消息体
 */
export interface ReqMessageModel {
  //parent child 消息来源
  from: MessageFrom,
  action: MessageActionEnums;
  data?: string;
  pageId?: string,
  pageType?: string
}

/**
 * 响应消息
 */
export interface RespMessageModel {
  //parent child 消息来源
  from: MessageFrom,
  action: MessageActionEnums;
  type: RespMessageEnums;
  data: any;
  /**
   * 标题，表单或页面名单
   */
  title: string,
}
